<template>
<div>
    <el-button>click</el-button>
    {{count}}
</div>
</template>

<script>
import axios from "axios"
export default {
    data(){
        return{

        }
    },
    methods:{

    },
    watch:{

    },
    computed:{
        count(){
            return this.$store.state.count
        }
    },
    mounted(){
        // let xhttp = new XMLHttpRequest();
        // xhttp.onreadystatechange = function(){
        //     console.log('this',this)
        //     console.log('this',this.responseText)
        // }

        // xhttp.open('GET','http://127.0.0.1:3000/api',true)

        // xhttp.send();
        axios.get('http://127.0.0.1:3000/api').then(data=>{
           console,log(data)
            console.log('返回信息',data.data)
        })
    }
}
</script>

<style lang="stylus">

</style>